///
/// 视频页面
/// page通话
///

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'BloC/dialogueBloC/index.dart';
import 'BloC/liveEmojiBloC/bloc.dart';
import 'view.dart';

class Live extends StatelessWidget {
  Live(
    this.isAnchor,
    this.isReceive,
    this.inv,
    this.userId,
    this.anchorId,
    this.targetName,
    this.targetHead,
    this.targetToken, {
    Key key,
  }) : super(key: key);

  final bool isAnchor;
  final bool isReceive;
  final int inv;
  final int userId;
  final int anchorId;
  final String targetName;
  final String targetHead;
  final String targetToken;

  @override
  Widget build(BuildContext context) {
    return MultiBlocProvider(
      providers: [
        BlocProvider<DialogueBloc>(
          create: (BuildContext context) => DialogueBloc(BaseVideoTextRepository()),
        ),
        BlocProvider<LiveEmojiBloc>(
          create: (BuildContext context) => LiveEmojiBloc(),
        ),
      ],
      child: LiveView(
        this.isAnchor,
        this.isReceive,
        this.inv,
        this.userId,
        this.anchorId,
        this.targetName,
        this.targetHead,
        this.targetToken,
      ),
    );
  }
}
